<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title></title>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/pintuer.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/volunteer.css">
    <script src="<%=request.getContextPath()%>/js/jquery.js"></script>
    <script src="<%=request.getContextPath()%>/js/pintuer.js"></script>
</head>
<body>
<div class="panel admin-panel">
    <div class="body-content">
        <!--注意action值的正确设置-->
        <form method="post" class="form-x" id="editForm" action="myinfo_edit">
            <div class="form-group">
                <div class="label">
                    <label>志愿者档案编号：</label>
                </div>
                <div class="field">
                    <p>${vol_id}</p>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>用户名：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${username}" name="username" data-validate="required:请设置姓名" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>用户名：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${sex}" name="sex" data-validate="required:请设置性别" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>手机号码：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${phone}" name="phone" data-validate="required:请设置电话号码" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>电子邮箱：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${email}" name="email" data-validate="required:请设置电子邮箱" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>专业和班级</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${majorclass}" name="majorclass" data-validate="required:请设置专业和班级" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>个人描述</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${caption}" name="caption" data-validate="required:请设置个人描述" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>现用密码：</label>
                </div>
                <div class="field">
                    <input type="password" class="input w50" value="" name="oldpwd" data-validate="required:请输入现用密码" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>新密码：</label>
                </div>
                <div class="field">
                    <input type="password" class="input w50" value="" name="newpwd" placeholder="不修改密码请留空" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>重复新密码：</label>
                </div>
                <div class="field">
                    <input type="password" class="input w50" value="" name="repwd" placeholder="不修改密码请留空" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label></label>
                </div>
                <div class="field">
                    <button class="button bg-main icon-check-square-o" type="button" onclick="editSubmit()"> 确认修改</button>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
<script>
function editSubmit() {
    if ($("input[name='newpwd']").val() !== '' || $("input[name='repwd']").val() !== '') {
        if ($("input[name='newpwd']").val() !== $("input[name='repwd']").val()) {
            alert("两次输入的新密码不一致！");
            return;
        }
    }
    $("#editForm").submit();
}
</script>
</html>
